﻿using System.Windows.Forms;

namespace ExtensionMethodExtravaganza
{
	public static class ListViewExtensions
	{
		public static void AutoSort(this ListView listView)
		{
			AutoSort(listView, new ListViewItemTextComparer());
		}

		public static void AutoSort(this ListView listView, ListViewItemComparer comparer)
		{
			listView.ListViewItemSorter = new ListViewComparer(listView, comparer);
		}
	}
}